package org.jeecg.modules.rooms.Enum;

public class CouponEnums {

	/**
	 * 房型app上架状态 枚举
	 */
	public static enum RoomLayoutAppStateEnum{
		UP(1,"上架"), DOWN(2,"下架");

		int code = 0;
		String value = "";

		private RoomLayoutAppStateEnum(int code,String value){
			this.code = code;
			this.value = value;
		}

		public int code(){
			return code;
		}

		public String getValue(){
			return value;
		}

		//根据CODE获取类型
		public static RoomLayoutAppStateEnum val(int vcode){
			for(RoomLayoutAppStateEnum bld: values()){
				if(bld.code == vcode){
					return bld;
				}
			}
			return DOWN;
		}

		public static RoomLayoutAppStateEnum val(String value){
			for(RoomLayoutAppStateEnum bld : values()){
				if(bld.value.equals(value)){
					return bld;
				}
			}
			return DOWN;
		}
	}

	public static enum RoomLayoutPriceTypeEnum {
		ALL_DAY(1,"全天房"), HOUR(2,"钟点房");

		int code = 0;
		String value = "";

		private RoomLayoutPriceTypeEnum(int code,String value){
			this.code = code;
			this.value = value;
		}

		public int code(){
			return code;
		}

		public String getValue(){
			return value;
		}

		//根据CODE获取类型
		public static RoomLayoutPriceTypeEnum val(int vcode){
			for(RoomLayoutPriceTypeEnum bld: values()){
				if(bld.code == vcode){
					return bld;
				}
			}
			return HOUR;
		}

		public static RoomLayoutPriceTypeEnum val(String value){
			for(RoomLayoutPriceTypeEnum bld : values()){
				if(bld.value.equals(value)){
					return bld;
				}
			}
			return HOUR;
		}
	}

	/**
	 * 楼栋楼层 枚举
	 */
	public static enum RoomBuildingFloorTypeEnum {
		BUILDING(1,"楼栋"), FLOOR(2,"楼层");

		int code = 0;
		String value = "";

		private RoomBuildingFloorTypeEnum(int code,String value){
			this.code = code;
			this.value = value;
		}

		public int code(){
			return code;
		}

		public String getValue(){
			return value;
		}

		//根据CODE获取类型
		public static RoomBuildingFloorTypeEnum val(int vcode){
			for(RoomBuildingFloorTypeEnum bld: values()){
				if(bld.code == vcode){
					return bld;
				}
			}
			return FLOOR;
		}

		public static RoomBuildingFloorTypeEnum val(String value){
			for(RoomBuildingFloorTypeEnum bld : values()){
				if(bld.value.equals(value)){
					return bld;
				}
			}
			return FLOOR;
		}
	}

	/**
	 * 全天放超时计费规则 枚举
	 */
	public static enum ALLDAYROOMRULETIMEOUT {
		MINUTE(1,"按分钟加收费用"), HALF_DAY(2,"按半天房费收费"), NOTPAY(3,"不收房费");

		int code = 0;
		String value = "";

		private ALLDAYROOMRULETIMEOUT(int code,String value){
			this.code = code;
			this.value = value;
		}

		public int code(){
			return code;
		}

		public String getValue(){
			return value;
		}

		//根据CODE获取类型
		public static ALLDAYROOMRULETIMEOUT val(int vcode){
			for(ALLDAYROOMRULETIMEOUT bld: values()){
				if(bld.code == vcode){
					return bld;
				}
			}
			return NOTPAY;
		}

		public static ALLDAYROOMRULETIMEOUT val(String value){
			for(ALLDAYROOMRULETIMEOUT bld : values()){
				if(bld.value.equals(value)){
					return bld;
				}
			}
			return NOTPAY;
		}
	}

	/**
	 * 全天放超时计费规则细节：统一设置还是根据房型 枚举
	 */
	public static enum ALLDAYROOMRULETYPEDETAILS {
		UNIFY(1,"统一设置"), LAYOUT(2,"根据房型设置");

		int code = 0;
		String value = "";

		private ALLDAYROOMRULETYPEDETAILS(int code,String value){
			this.code = code;
			this.value = value;
		}

		public int code(){
			return code;
		}

		public String getValue(){
			return value;
		}

		//根据CODE获取类型
		public static ALLDAYROOMRULETYPEDETAILS val(int vcode){
			for(ALLDAYROOMRULETYPEDETAILS bld: values()){
				if(bld.code == vcode){
					return bld;
				}
			}
			return LAYOUT;
		}

		public static ALLDAYROOMRULETYPEDETAILS val(String value){
			for(ALLDAYROOMRULETYPEDETAILS bld : values()){
				if(bld.value.equals(value)){
					return bld;
				}
			}
			return LAYOUT;
		}
	}



	/**
	 * 商品分类应用范围
	 */
	public static enum CesStockTypeApplyScopeEnum {
		GUEST_ROOM(1, "客房"), POS(2, "pos"), FUN(3, "娱乐");
		int code = 0;
		String value = "";

		private CesStockTypeApplyScopeEnum(int code, String value) {
			this.code = code;
			this.value = value;
		}

		public int code() {
			return code;
		}

		public String getValue() {
			return value;
		}

		//根据CODE获取类型
		public static CesStockTypeApplyScopeEnum val(int vcode) {
			for (CesStockTypeApplyScopeEnum bld : values()) {
				if (bld.code == vcode) {
					return bld;
				}
			}
			return POS;
		}

		public static CesStockTypeApplyScopeEnum val(String value) {
			for (CesStockTypeApplyScopeEnum bld : values()) {
				if (bld.value.equals(value)) {
					return bld;
				}
			}
			return POS;
		}

	}

	/**
	 *
	 */
	public static enum CesGoodsStockRecordsScopeEnum {
		ENTER(1, "进"), REFUND(2, "退");
		int code = 0;
		String value = "";

		private CesGoodsStockRecordsScopeEnum(int code, String value) {
			this.code = code;
			this.value = value;
		}

		public int code() {
			return code;
		}

		public String getValue() {
			return value;
		}

		//根据CODE获取类型
		public static CesGoodsStockRecordsScopeEnum val(int vcode) {
			for (CesGoodsStockRecordsScopeEnum bld : values()) {
				if (bld.code == vcode) {
					return bld;
				}
			}
			return REFUND;
		}

		public static CesGoodsStockRecordsScopeEnum val(String value) {
			for (CesGoodsStockRecordsScopeEnum bld : values()) {
				if (bld.value.equals(value)) {
					return bld;
				}
			}
			return REFUND;
		}

	}
}
